Increase MAX_VIRT_CPUS and NR_CPUS to 64.
Check maxcpus < MAX_VIRT_CPUS.
Check size of shared_info (<= PAGE_SIZE).
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
DEFINE(IA64_SWITCH_STACK_SIZE, sizeof (struct switch_stack));
DEFINE(IA64_CPU_SIZE, sizeof (struct cpuinfo_ia64));
DEFINE(UNW_FRAME_INFO_SIZE, sizeof (struct unw_frame_info));
+ DEFINE(SHARED_INFO_SIZE, sizeof (struct shared_info));
BLANK();
#ifdef VTI_DEBUG
#include <asm/vmx.h>
#include <linux/efi.h>
+/* Be sure the struct shared_info fits on a page because it is mapped in
+ domain. */
+#if SHARED_INFO_SIZE > PAGE_SIZE
+ #error "struct shared_info does not not fit in PAGE_SIZE"
+#endif
+
unsigned long xenheap_phys_end;
char saved_command_line[COMMAND_LINE_SIZE];
//boot_cpu_data.x86_num_cores = 1;
}
+ /* A vcpu is created for the idle domain on every physical cpu.
+ Limit the number of cpus to the maximum number of vcpus. */
+ if (max_cpus > MAX_VIRT_CPUS)
+ max_cpus = MAX_VIRT_CPUS;
+
smp_prepare_cpus(max_cpus);
+
/* We aren't hotplug-capable yet. */
for_each_cpu ( i )
cpu_set(i, cpu_present_map);
#ifdef CONFIG_XEN_SMP
#define CONFIG_SMP 1
-#define NR_CPUS 8
-#define CONFIG_NR_CPUS 8
+#define NR_CPUS 64
#else
#undef CONFIG_SMP
#define NR_CPUS 1
-#define CONFIG_NR_CPUS 1
#endif
-//#define NR_CPUS 16
-//#define CONFIG_NR_CPUS 16
-//leave SMP for a later time
-//#undef CONFIG_SMP
+#define CONFIG_NR_CPUS NR_CPUS
#define supervisor_mode_kernel (0)
#define CMPXCHG_BUGCHECK_DECL
// from include/asm-ia64/smp.h
-#ifdef CONFIG_SMP
-//#warning "Lots of things to fix to enable CONFIG_SMP!"
-#endif
#define get_cpu() smp_processor_id()
#define put_cpu() do {} while(0)
#endif /* __ASSEMBLY__ */
#endif /* __XEN_IA64_CONFIG_H__ */
-// needed for include/xen/smp.h
-//#ifdef CONFIG_SMP
-//#define raw_smp_processor_id() current->processor
-//#else
-//#define raw_smp_processor_id() 0
-//#endif
-
#ifndef __ASSEMBLY__
#include <linux/linkage.h>
#define FORCE_CRASH() asm("break.m 0;;");
/* Maximum number of virtual CPUs in multi-processor guests. */
/* WARNING: before changing this, check that shared_info fits on a page */
-#define MAX_VIRT_CPUS 4
+#define MAX_VIRT_CPUS 64
#ifndef __ASSEMBLY__